package com.kaoshi.myweb.webstruts.controller;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;

import com.opensymphony.xwork2.ActionSupport;

public class DowmAction extends ActionSupport {
	
	public String getContentDisposition() throws UnsupportedEncodingException {
		String filename = new String("测试".getBytes(), "ISO8859-1");
		return "attachment;filename=\"" + filename + ".jpg\"";
	}
	public InputStream getInputStream()throws Exception {
		File file = new File("d:/test");
		return new FileInputStream(file);
	}
}
